Another fix in gpx.cc. With this, vtesto runs to completion on Ubuntu 12.04.
authorrobertlipe <robertlipe@gmail.com>
Sun, 25 Aug 2013 21:25:07 +0000 (21:25 +0000)
committerrobertlipe <robertlipe@gmail.com>
Sun, 25 Aug 2013 21:25:07 +0000 (21:25 +0000)
gpsbabel/gpx.cc

index 852504dddfd4e455fa3ecfdaf2090f8a82f58ed8..27cdcc123228d9ab60f4c0328e0a29edffd01151 100644 (file)
@@ -206,18 +206,17 @@ gpx_add_to_global(gpx_global_entry* ge, const QString& s)
 {
   queue* elem, *tmp;
   gpx_global_entry* gep;
-  const char* cdata = CSTR(s);
 
   QUEUE_FOR_EACH(&ge->queue, elem, tmp) {
     gep = BASE_STRUCT(elem, gpx_global_entry, queue);
-    if (0 == strcmp(cdata, gep->tagdata)) {
+    if (0 == s.compare(gep->tagdata)) {
       return;
     }
   }
 
   gep = (gpx_global_entry*) xcalloc(sizeof(*gep), 1);
   QUEUE_INIT(&gep->queue);
-  gep->tagdata = xstrdup(cdata);
+  gep->tagdata = xstrdup(CSTR(s));
   ENQUEUE_TAIL(&ge->queue, &gep->queue);
 }